const install = (Vue, vm) => {
	// 公共部分
	// let setting = (params) => vm.$u.post('setting', params);
	let upload = (params) => vm.$u.post('upload', params); //上传图片
	// let smsSend = (params) => vm.$u.get('system/user/sendAuthCode/'+params.phone); //发送验证码
    
	// let register = (params) => vm.$u.post('system/user/enrollR', params); //注册
    let login = (params) => vm.$u.post('/api/login', params);//登录
	let index = (params) => vm.$u.post('index', params);//登录
	let assets_statistic = (params) => vm.$u.post('/api/assets_statistic', params);//用户资产统计
	

	let announcement = (params) => vm.$u.post('/api/announcement', params);//公告列表
	let announcement_detail = (params) => vm.$u.post('/api/announcement_detail', params);//公告详情
	let userinfo = (params) => vm.$u.post('/api/userinfo', params);//用户信息
	let rechange_address = (params) => vm.$u.post('/api/rechange_address', params);//充币
	let withdraw = (params) => vm.$u.post('/api/withdraw', params);//提现
	let apiconfig = (params) => vm.$u.post('/api/config', params);//配置接口
	let register = (params) => vm.$u.post('/api/register', params);//注册
	let sendEmail = (params) => vm.$u.post('/api/sendEmail', params);//发送邮箱
	let editPasswd = (params) => vm.$u.post('/api/editPasswd', params);//修改密码
	let withdrawRecord = (params) => vm.$u.post('/api/withdrawRecord', params);//提现记录
	let retrievePasswd = (params) => vm.$u.post('/api/retrievePasswd', params);//找回密码
	let edit_user = (params) => vm.$u.post('/api/edit_user', params);//设置用户信息
	let money_log = (params) => vm.$u.post('/api/money_log', params);//资金类型
	let rechange_log = (params) => vm.$u.post('/api/rechange_log', params);//充币记录
	let get_team = (params) => vm.$u.post('/api/get_team', params);//我的团队
	let invite_rebate = (params) => vm.$u.post('/api/invite_rebate', params);//返佣奖励
	let week_dividends = (params) => vm.$u.post('/api/week_dividends', params);//周分红
	let currency = (params) => vm.$u.post('/api/currency', params);//
	let services = (params) => vm.$u.post('/api/services', params);//服务协议
	let privacyStatement = (params) => vm.$u.post('/api/privacyStatement', params);//隐私保护
	
	vm.$u.api = {
		login,
		assets_statistic,
		announcement,
		announcement_detail,
		userinfo,
		rechange_address,
		withdraw,
		apiconfig,
		register,
		sendEmail,
		editPasswd,
		withdrawRecord,
		retrievePasswd,
		edit_user,
		money_log,
		rechange_log,
		get_team,
		invite_rebate,
		week_dividends,
		currency,
		services,
		privacyStatement,
		index
	};
}
export default {
	install
}
// let res = await this.$u.api.pickUpTheGoods({
// 	monadId:id
// });
// if(res.code == 200){
// 	this.$u.toast("提货成功");
// 	this.goodList = []
// 	this.getlist();
// }else{
// 	this.$u.toast("失败");
// }
//:src="ossThree(item.bigimage)"

// getClear(){
// 	this.list = []
// 	this.page = 1,
// 	this.status= "loadmore"
// 	this.getList()
// }
// userid:uni.getStorageSync('userid')
// :src="ossThree('/ui/twobg.png')"
// list: [],
// page: 1,
// limit: 10,
// last_page: 1,
// status: "loadmore",

{/* <u-loadmore :status="status" @loadmore="loadmore" /> */}

// async getList(){//列表数据
// 	let res = await this.$u.api.SearchHotel({
// 	  pagesize:this.limit,
// 	  pageindex:this.page
// 	});
// 	// console.log(res)
// 	// this.last_page = res.list.last_page;
// 	if(res.state == 0){
// 		let list = res.Data;
// 		this.list = this.page == 1 ? list : [...this.list, ...list];	
// 		// console.log(this.list)
// 		if(res.Data == ''){
// 		  this.status = 'nomore';
// 		}
	// if(this.page == 1){
	// 	if( this.list.length<this.limit){
	// 		this.status = 'nomore';
	// 	}
	// }
// 	}
	
// },
// loadmore() {
// 	let page = this.page;
// 	// let last_page = this.last_page;
// 	if (this.status == 'loadmore') {
// 		this.page++;
// 		this.getList();
// 	}
// },

// onReachBottom: function () {
// 	this.loadmore();
// },